package Eyjafjalla.card.skill;

import Eyjafjalla.action.DreamKeyAction;
import Eyjafjalla.blight.DreamKey;
import Eyjafjalla.card.AbstractEyjafjallaCard;
import com.megacrit.cardcrawl.cards.AbstractCard;
import com.megacrit.cardcrawl.characters.AbstractPlayer;
import com.megacrit.cardcrawl.core.CardCrawlGame;
import com.megacrit.cardcrawl.localization.CardStrings;
import com.megacrit.cardcrawl.monsters.AbstractMonster;

public class DollyInvitation_Eyjafjalla extends AbstractEyjafjallaCard {
    public static final String ID = "DollyInvitation_Eyjafjalla";
    private static final CardStrings cardStrings;

    public DollyInvitation_Eyjafjalla(){
        this(0);
    }

    public DollyInvitation_Eyjafjalla(int upgradeTimes){
        super(ID, cardStrings.NAME,6,cardStrings.DESCRIPTION,CardType.SKILL,CardColor.COLORLESS,CardRarity.SPECIAL,CardTarget.NONE);
        this.purgeOnUse = true;
        this.timesUpgraded = upgradeTimes;
    }

    @Override
    public AbstractCard makeCopy() {
        return new DollyInvitation_Eyjafjalla(this.timesUpgraded);
    }

    @Override
    public void use(AbstractPlayer p, AbstractMonster m) {
        addToBot(new DreamKeyAction(this));
    }

    @Override
    public boolean canUpgrade() {
        return timesUpgraded<3;
    }



    @Override
    public void upgrade() {
        ++this.timesUpgraded;
        upgradeBaseCost(6-timesUpgraded*2);
        this.upgraded = true;
        this.name = cardStrings.NAME + "+" + this.timesUpgraded;
        this.initializeTitle();
    }


    static {
        cardStrings = CardCrawlGame.languagePack.getCardStrings(ID);
    }
}






